<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>修改用户</title>
<link rel="stylesheet" href="../style/drp.css">
<script src="../script/client_validate.js"></script>
<script type="text/javascript">
	
	function goBack() {
		window.self.location ="users.do"
	}
	
	function modifyUser() {
		if (document.getElementById("name").value == "") {
			alert("用户名称不能为空！");
			return;
		}
		if ((document.getElementById("password1").value.length < 6)||(document.getElementById("password2").value.length < 6)) {
			alert("用户密码不能小于6个字符！");
			return;
		}
		with (document.getElementById("userActionForm")) {
			method = "post";
			action = "users.do?method=update";
			submit();
		}
	}	
</script>

</head>

<body class="body1">
<form name="userActionForm" id="userActionForm">
<div align="center">
<table width="95%" border="0" cellspacing="2" cellpadding="2">
	<tr>
		<td>&nbsp;</td>
	</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0"
	height="25">
	<tr>
		<td width="522" class="p1" height="25" nowrap><img
			src="../images/mark_arrow_03.gif" width="14" height="14">
		&nbsp; <b>系统管理&gt;&gt;用户维护&gt;&gt;修改</b></td>
	</tr>
</table>
<hr width="97%" align="center" size=0>
<table width="95%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="22%" height="29">
		<div align="right">用户名:&nbsp;</div>
		</td>
		<td width="78%"><input name="name" type="text" class="text1"
			id="name" value="<bean:write name="user" property="name"/>" size="10"
			maxlength="10" readonly="true"></td>
	</tr>
	<tr>
		<td height="26">
		<div align="right"><font color="#FF0000">*</font>输入密码:&nbsp;</div>
		</td>
		<td><input name="password1" type="password" class="text1"
			id="password1" value="<bean:write name="user" property="password"/>"
			size="20" maxlength="20"></td>
	</tr>
	<tr>
		<td height="26">
		<div align="right"><font color="#FF0000">*</font>密码:&nbsp;</div>
		</td>
		<td><label> <input name="password2" type="password"
			class="text1" value="<bean:write name="user" property="password"/>"
			id="password2" size="20" maxlength="20"> </label></td>
	</tr>
	<tr>
		<td height="26">
		<div align="right">用户类型:&nbsp;</div>
		</td>
		<td><select name="userType">
			<option value="dean">药库主任</option>
			<option value="DrugManager">药库药品管理员</option>
			<option value="Accountant">药库会计</option>
			<option value="Buyer">药库采购员</option>
			<option value="SystemAdmin">药库系统管理员</option>

		</select></td>
	</tr>
	<tr>
		<td height="26">
		<div align="right">性别:&nbsp;</div>
		</td>
		<td><input name="sex" type="text" class="text1" id="sex"
			value="<bean:write name="user" property="sex"/>" size="20"
			maxlength="20"></td>
	</tr>
</table>
<hr width="97%" align="center" size=0>
<div align="center">
<input name="btnModify" class="button1"
	type="button" id="btnModify" value="修改" onclick="modifyUser()">
&nbsp;&nbsp;&nbsp;&nbsp; 
<input name="btnBack" class="button1"
	type="button" id="btnBack" value="返回" onclick="goBack()" /></div>
</div>
</form>
</body>
</html>
